import { http } from "@/utils/http";
import type { Result } from "@/api/typeConfig";

export const listApi = params =>
  http.request<Result>("get", "/system/statistics/userLendReturnStatistics", {
    params
  });

export const exportApi = data =>
  http.request<Result>(
    "post",
    "/system/statistics/userLendReturnStatistics/export",
    {
      data,
      responseType: "blob"
    }
  );

export const detailApi = params =>
  http.request<Result>(
    "get",
    `/system/statistics/userLendReturnStatistics/${params.userId}`
  );

export const listByUserApi = params =>
  http.request<Result>("get", "/system/statistics/userLendReturnRecordStats", {
    params
  });
